<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"
    />
    <title>touch</title>
    <style>
      * {
        margin: 0;
        padding: 0;
      }
      .box {
        width: 100%;
        height: 400px;
        background-color: yellowgreen;
      }
    </style>
  </head>
  <body>
    <div class="box"></div>
    <script>
      const box = document.querySelector(".box");

      box.addEventListener("touchstart", function (e) {
        console.log("touchstart", e);
      });

      box.addEventListener("touchmove", function (e) {
        console.log("touchmove", e);
      });

      box.addEventListener("touchend", function (e) {
        console.log("touchend", e);
      });
    </script>
  </body>
</html>
